﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace dbPoll_Application.Models
{
    public class Keypad
    {
        public virtual int KeypadID { get; set; }
        public virtual String DeviceID { get; set; }

        public Keypad()
        {
            this.KeypadID = -1;
            this.DeviceID = String.Empty;
        }

        public Keypad(String deviceID)
        {
            this.KeypadID = -1;
            this.DeviceID = deviceID;
        }

        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return false;
            }
            var keypad = obj as Keypad;
            if ((System.Object)keypad == null)
            {
                return false;
            }
            return this.KeypadID == keypad.KeypadID;
        }

        public override int GetHashCode()
        {
            return this.KeypadID;
        }
    }
}
